<template>
	<div class="contain">
		<h3 class="titlecomm">有什么想和大家想说的？</h3>
		<el-form ref="form" :model="form">
			<el-form-item>
				<el-input type="textarea" v-model="form.comment"></el-input>
			</el-form-item>
			<el-form-item class='btncomm'>
				<el-button type="primary" @click="onSubmit">评论</el-button>
				<el-button>取消</el-button>
			</el-form-item>
		</el-form>
		<commentlist></commentlist>
	</div>
</template>

<script>
	import commentlist from './commentlist.vue'
	export default {
		name: 'comment',
		components: {
			commentlist
		},
		data() {
			return {
				form: {
					comment: ''
				}
			}
		},
		methods: {
			onSubmit() {
				console.log('submit!');
			}
		}
	}
</script>

<style>
	.contain {
		margin-left: 10%;
		margin-right: 10%;
		margin-top: 5%;
	}

	.titlecomm {
		font-family: 华文行楷;
		font-size: 40px;
	}
	.btncomm {
		text-align: right;
	}
</style>
